package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MmSupplierTermOfPayment generated by hbm2java
 */
@Entity
@Table(name="mm_supplier_term_of_payment"
    ,catalog="ncsc_erp"
)
public class MmSupplierTermOfPayment  implements java.io.Serializable {


     private MmSupplierTermOfPaymentId id;
     private MmSupplier mmSupplier;
     private SysTermOfPayment sysTermOfPayment;
     private Date supplierTermOfPaymentEffectiveDate;
     private Date supplierTermOfPaymentExpireDate;
     private Short supplierTermOfPaymentIsActive;

    public MmSupplierTermOfPayment() {
    }

	
    public MmSupplierTermOfPayment(MmSupplierTermOfPaymentId id, MmSupplier mmSupplier) {
        this.id = id;
        this.mmSupplier = mmSupplier;
    }
    public MmSupplierTermOfPayment(MmSupplierTermOfPaymentId id, MmSupplier mmSupplier, SysTermOfPayment sysTermOfPayment, Date supplierTermOfPaymentEffectiveDate, Date supplierTermOfPaymentExpireDate, Short supplierTermOfPaymentIsActive) {
       this.id = id;
       this.mmSupplier = mmSupplier;
       this.sysTermOfPayment = sysTermOfPayment;
       this.supplierTermOfPaymentEffectiveDate = supplierTermOfPaymentEffectiveDate;
       this.supplierTermOfPaymentExpireDate = supplierTermOfPaymentExpireDate;
       this.supplierTermOfPaymentIsActive = supplierTermOfPaymentIsActive;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="supplierNo", column=@Column(name="SUPPLIER_NO", nullable=false) ), 
        @AttributeOverride(name="supplierTermOfPaymentSeqNo", column=@Column(name="SUPPLIER_TERM_OF_PAYMENT_SEQ_NO", nullable=false) ) } )
    public MmSupplierTermOfPaymentId getId() {
        return this.id;
    }
    
    public void setId(MmSupplierTermOfPaymentId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SUPPLIER_NO", nullable=false, insertable=false, updatable=false)
    public MmSupplier getMmSupplier() {
        return this.mmSupplier;
    }
    
    public void setMmSupplier(MmSupplier mmSupplier) {
        this.mmSupplier = mmSupplier;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SUPPLIER_TERM_OF_PAYMENT_NO")
    public SysTermOfPayment getSysTermOfPayment() {
        return this.sysTermOfPayment;
    }
    
    public void setSysTermOfPayment(SysTermOfPayment sysTermOfPayment) {
        this.sysTermOfPayment = sysTermOfPayment;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="SUPPLIER_TERM_OF_PAYMENT_EFFECTIVE_DATE", length=10)
    public Date getSupplierTermOfPaymentEffectiveDate() {
        return this.supplierTermOfPaymentEffectiveDate;
    }
    
    public void setSupplierTermOfPaymentEffectiveDate(Date supplierTermOfPaymentEffectiveDate) {
        this.supplierTermOfPaymentEffectiveDate = supplierTermOfPaymentEffectiveDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="SUPPLIER_TERM_OF_PAYMENT_EXPIRE_DATE", length=10)
    public Date getSupplierTermOfPaymentExpireDate() {
        return this.supplierTermOfPaymentExpireDate;
    }
    
    public void setSupplierTermOfPaymentExpireDate(Date supplierTermOfPaymentExpireDate) {
        this.supplierTermOfPaymentExpireDate = supplierTermOfPaymentExpireDate;
    }

    
    @Column(name="SUPPLIER_TERM_OF_PAYMENT_IS_ACTIVE")
    public Short getSupplierTermOfPaymentIsActive() {
        return this.supplierTermOfPaymentIsActive;
    }
    
    public void setSupplierTermOfPaymentIsActive(Short supplierTermOfPaymentIsActive) {
        this.supplierTermOfPaymentIsActive = supplierTermOfPaymentIsActive;
    }




}


